<%--
  User: Viktor
  Date: 10/13/13
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
</head>
<body>
<%  String path = request.getContextPath();
    String b = (String)session.getAttribute("auth");
    if(b!=null && b.equals("true"))
    {

        out.println("logged in as "+(String)session.getAttribute("username"));
        out.println("<form method=\"post\" action=\"POI\">");

        out.println("<input type=\"submit\" value=\"Submit\"/>");

        out.println("</form>");
%>
<p/>

<%

        //request.getRequestDispatcher("web/logout.jsp").forward(request, response);
        out.println("<a href=\""+path+"/logout.jsp\">logout</a>");
    }
    else
    {

        out.println("not logged in");
        //request.getRequestDispatcher("web/register.jsp").forward(request, response);

        out.println("<a href=\""+path+"\"/register.jsp\">register</a>");
    }%>

</body>
</html>